package club.zhilin.guli.service.vod.service;

import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.vod.model.v20170321.DeleteVideoResponse;

import java.io.InputStream;

/**
 * @author zhilin
 * @since 2022/2/11 20:44
 */
public interface IVideoService {
    /**
     * 视频上传
     *
     * @param inputStream      上传流
     * @param originalFileName 源文件名称
     * @return 视频的VideoId
     */
    String uploadVideo(InputStream inputStream, String originalFileName);

    /**
     * 删除视频
     *
     * @param ids 视频id，多个id用 , 分割
     * @return DeleteVideoResponse
     * @throws ClientException 阿里云客户端异常
     */
    DeleteVideoResponse removeVideo(String ids) throws ClientException;

    /**
     * 根据视频id获取视频播放凭证
     *
     * @param id 视频id
     * @return string
     * @throws ClientException 阿里云客户端异常
     */
    String getPlayAuth(String id) throws ClientException;
}
